home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8079 < prev    next >
Encoding:
Text File  |  1996-08-05  |  899 b   |  31 lines

  1. Path: sentef2.fi.uib.no!boukanov
  2. From: boukanov@sentef2.fi.uib.no (Igor Boukanov)
  3. Newsgroups: comp.lang.c++
  4. Subject: ? about friend template
  5. Date: 14 Feb 1996 11:15:36 GMT
  6. Organization: Fysisk institutt, Universitetet i Bergen
  7. Message-ID: <4fsg8o$rh1@ugress.uib.no>
  8. NNTP-Posting-Host: sentef2.fi.uib.no
  9. Summary: problems with declaration friend template classes.
  10. Keywords: c++, template
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. I have the next questions. How is it possible to declare template class 
  14. to be a friend of non template class? I tried to write something like this:
  15.  
  16. template<class T> class template_class{
  17.    ...
  18. };
  19.  
  20. class simple_class{
  21.    friend template<class T> class template_class;
  22.    // or template<class T> friend class template_class;
  23.    ...
  24. };
  25.  
  26. but g++ compiler produced the error: parse error before `template'...
  27.  
  28. --
  29. With best regards,  
  30. Igor Boukanov (igor.boukanov@fi.uib.no).
  31.